import axios from 'axios'

export default {
  state: {
    data: {}
  },
  mutations: {
    getData(state, res) {
      state.data = res.data
    }
  },
  actions: {
    getData(context) {
      axios.get('http://10.41.151.69:3000/data/indexrec').then(res => {
        context.commit('getData', res)
      })
    }
  }
}
